package com.xbongbong.paas.util;

import com.xbongbong.saas.constant.BasicConstant;

/**
 * @author 吴峰
 * @date 2022/08/22 11:00
 */
public class WorkflowFormulaUtil {

    public static String[] getAttrByFormula(String formulaAttr) {
        return formulaAttr.replaceAll("[\\{\\}]", "").split("\\.");
    }

    public static boolean validateFormula(String[] list, String formula) {
        return list.length > BasicConstant.THREE && (formula.contains("1.") || formula.contains("0."));
    }
}
